package com.ruoyi.file.component;

import com.ruoyi.file.domain.FileInfo;
import com.ruoyi.file.task.FileUploadTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import java.io.File;

@Component
public class FileUploadProcess {
    @Autowired
    @Qualifier("fileUploadTaskExecutor")
    private ThreadPoolTaskExecutor taskExecutor;


    public void sendFileUploadMessage(String file, String bucket, String objectName) {
        taskExecutor.submit(new FileUploadTask(file,bucket,objectName));
    }
}
